//---------------------------------------------------------------------------
#ifndef GLSkel3DH
#define GLSkel3DH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Menus.hpp>
#include "Cilindro.h"
#include "Tablero.h"
#include "Camera.h"
#include "Copa.h"
#include "Habitaciones.h"
#include "Television.h"
#include "Muebles.h"
#include "Estanteria.h"
#include "Lampara.h"
#include "PlatoDonut.h"

#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>
#include <stdio.h>	


#pragma comment( lib, "glaux.lib" )

//---------------------------------------------------------------------------
class TGLForm3D : public TForm
{
__published:	// IDE-managed Components
        TMainMenu *MainMenu1;
        TMenuItem *Espiral1;
        TMenuItem *Copa1;
        TMenuItem *Izquierda1;
        TMenuItem *Derecha1;
        TMenuItem *Ortogonal1;
        TMenuItem *Oblicua1;
        TMenuItem *Perspectiva1;
        TMenuItem *N1;
    TMenuItem *Esquina1;
    TMenuItem *Lateral1;
    TMenuItem *Frontal1;
    TMenuItem *Cenital1;
    TMenuItem *Objeto1;
    TMenuItem *Lampara1;
    TMenuItem *Muebles1;
    TMenuItem *Camara1;
        TMenuItem *Luces1;
        TMenuItem *Lmpara1;
        TMenuItem *Sol1;
        TMenuItem *Ambiente1;
        TMenuItem *Quitarluzambiente1;
        TMenuItem *Niebla1;
    void __fastcall FormResize(TObject *Sender);
    void __fastcall FormPaint(TObject *Sender);
    void __fastcall FormDestroy(TObject *Sender);
    void __fastcall FormCreate(TObject *Sender);
        void __fastcall FormKeyPress(TObject *Sender, char &Key);
        void __fastcall Ortogonal1Click(TObject *Sender);
        void __fastcall Oblicua1Click(TObject *Sender);
        void __fastcall Perspectiva1Click(TObject *Sender);
        void __fastcall Izquierda1Click(TObject *Sender);
        void __fastcall Derecha1Click(TObject *Sender);
    void __fastcall Cenital1Click(TObject *Sender);
    void __fastcall Frontal1Click(TObject *Sender);
    void __fastcall Lateral1Click(TObject *Sender);
    void __fastcall Esquina1Click(TObject *Sender);
    void __fastcall Lampara1Click(TObject *Sender);
    void __fastcall Muebles1Click(TObject *Sender);
    void __fastcall Camara1Click(TObject *Sender);
        void __fastcall Lmpara1Click(TObject *Sender);
        void __fastcall Sol1Click(TObject *Sender);
        void __fastcall Ambiente1Click(TObject *Sender);
        void __fastcall Niebla1Click(TObject *Sender);
        void __fastcall Quitarluzambiente1Click(TObject *Sender);

private:        // User declarations
    HDC hdc;
    HGLRC hrc;
    GLdouble RatioViewPort, xLeft,xRight, yBot,yTop, N,F;  // Volumen de vista
    GLfloat PosicionLuz0[4];  // luz0
    void __fastcall SetPixelFormatDescriptor();
    void __fastcall GLScene();
    AUX_RGBImageRec *LoadBMP(char *Filename);
    void liberarObjetosEscena();
    VectorPoint3D* localCoordinates(float t);

    Camera *camara;

    Estanteria* estanteria;
    int opcionMovimiento;
    float t;
    float angle;
    float angle2;
    float angle3;
    int objetoAMover;
    bool drawWire;
    bool cerrandoApp;

    int ejex,ejey, ejez;

    int escalado;

    int mouseX,mouseY;

    Cilindro* cilindro;
    Tablero * tablero;
    Lampara * lampara;
    
    Television* television;
    Habitaciones* habitacion;
    Muebles* muebles;
    PlatoDonut* plato;


        AUX_RGBImageRec** texturas;


public:		// User declarations
    __fastcall TGLForm3D(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TGLForm3D *GLForm3D;
//---------------------------------------------------------------------------
#endif
